﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
   xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:eim="clr-namespace:Microsoft.Expression.Interactivity.Media;assembly=Microsoft.Expression.Interactions" 
    x:Class="Social_Photos.TopView"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">
	<phone:PhoneApplicationPage.Resources>
		<Storyboard x:Name="Storyboard1">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="myDialog">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimation Duration="0:0:1" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="instructionsTextBlock" d:IsOptimized="True"/>
			<DoubleAnimation Duration="0:0:1" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="login1" d:IsOptimized="True"/>
			<DoubleAnimation Duration="0:0:1" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="username" d:IsOptimized="True"/>
			<DoubleAnimation Duration="0:0:1" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="instructionsTextBlock_Copy" d:IsOptimized="True"/>
			<DoubleAnimation Duration="0:0:1" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="passwordBox" d:IsOptimized="True"/>
			<DoubleAnimation Duration="0:0:1" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="checkBox" d:IsOptimized="True"/>
		</Storyboard>
	</phone:PhoneApplicationPage.Resources>


    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

	<phone:PhoneApplicationPage.FontFamily>
		<StaticResource ResourceKey="PhoneFontFamilyNormal"/>
	</phone:PhoneApplicationPage.FontFamily>
	<phone:PhoneApplicationPage.FontSize>
		<StaticResource ResourceKey="PhoneFontSizeNormal"/>
	</phone:PhoneApplicationPage.FontSize>
	<phone:PhoneApplicationPage.Foreground>
		<StaticResource ResourceKey="PhoneForegroundBrush"/>
	</phone:PhoneApplicationPage.Foreground>


    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,12">
            <TextBlock x:Name="ApplicationTitle" Text="SOCIAL PHOTOS" 
                       Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="Top View" Margin="9,-7,0,0" 
                       Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--Use the recommended progress bar.-->
        <toolkit:PerformanceProgressBar Height="10" HorizontalAlignment="Left" Margin="10,0,10,0" 
                                        x:Name="requestProgress" VerticalAlignment="Top" 
                                        Width="455" Grid.Row="1" Visibility="Collapsed"
                                         IsIndeterminate="false" IsHitTestVisible="False"/>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <ListBox Margin="0,0,-12,0" x:Name="PhotosListBox"  
           Height="Auto">
                <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                        <toolkit:WrapPanel ItemHeight="120" ItemWidth="150"/>
                    </ItemsPanelTemplate>
                </ListBox.ItemsPanel>
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Margin="0,0,0,17" Orientation="Vertical" 
                    HorizontalAlignment="Center">
                            <Image Source="{Binding image}" 
                   Height="120" Width="130" />
                           
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
            <Button Content="Login" Height="72"  Width="442"    HorizontalAlignment="Left" Margin="2,544,0,0" x:Name="login" Click="login_Click" VerticalAlignment="Top"/>
            <!--80808080-->
            <Canvas x:Name="myDialog"
                    Height="332"
                    Width="454"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Top"
                    Margin="2,283,0,0"
                    Background="Black" d:IsHidden="True" 
                    Visibility="Collapsed"
                    >
            
                <TextBlock VerticalAlignment="Top"
                           HorizontalAlignment="Left"
                           Height="50"
                           Width="123"
                           x:Name="instructionsTextBlock"
                           Text="User name"
                           TextAlignment="Left"
                           TextWrapping="Wrap" Canvas.Top="50" Foreground="White" Canvas.Left="12"
                           />

                <Button Height="70"
                        Width="442"
                        Content="Login"
                        x:Name="login1"
                        Click="login1_Click" Canvas.Left="0" Canvas.Top="262" />
                <TextBox x:Name="username" Canvas.Left="108" TextWrapping="Wrap" Text="trung" Canvas.Top="30" Width="333"/>
                <TextBlock VerticalAlignment="Top"
                	Height="50"
                	Width="123"
                	x:Name="instructionsTextBlock_Copy"
                	Text="Password"
                	TextAlignment="Left"
                	TextWrapping="Wrap" Canvas.Top="126" Canvas.Left="24" HorizontalAlignment="Left" Foreground="White"
                           />
                <PasswordBox x:Name="passwordBox" Canvas.Left="108" Canvas.Top="106" Width="333" Password="123456"/>
                <CheckBox x:Name="checkBox" Content="Remember" Canvas.Left="108" Canvas.Top="180" RenderTransformOrigin="0.15,0.271"/>


            </Canvas>


        </Grid>
    </Grid>

</phone:PhoneApplicationPage>
